package vip.xiaonuo.facedoor.modular.device.entity;

import lombok.Data;
import vip.xiaonuo.facedoor.modular.baseEntity.TreeNode;

import java.util.LinkedList;
import java.util.List;

/**
 * 设备分类定义
 * 后续需要添加设备类型，在这边维护
 */
@Data
public class DeviceCategory {

    public static final int MAIN_TYPE_DOOR = 100; // 门禁机主分类
    public static final int MAIN_TYPE_STORE = 101; // 存储柜主分类
    public static final int MAIN_TYPE_TRAIL = 102; // 梯控主分类
    public static final int MAIN_TYPE_BOX = 103; // 边缘盒子主分类


    public static final int SUB_TYPE_FACE = 1; // 人脸门禁机
    public static final int SUB_TYPE_HUMAN = 2; // 人证机
    public static final int SUB_TYPE_QRCODE = 3; // 二维码门禁
    public static final int SUB_TYPE_PALM = 4; // 掌静脉门禁
    public static final int SUB_TYPE_STORE = 5; // 存储柜
    public static final int SUB_TYPE_STORE_PALM = -5; // 存储柜的掌静脉
    public static final int SUB_TYPE_VISIT = 6; // 访客机

    public static final int SUB_TYPE_FACE_HQ = 7; // 海清门禁
    public static final int SUB_TYPE_TRAIL = 9; // 梯控
    public static final int SUB_TYPE_BOX = 8; // 智能分析盒
    public static final int SUB_TYPE_AI_CAMERA = 12; // 旷视智能分析摄像头
    public static final int SUB_TYPE_AI_HT = 10; // 旷视鸿图


    private static List<TreeNode> categories = new LinkedList<>();

    static {
        List<TreeNode> categoryList1 = new LinkedList<>();
        categoryList1.add(new TreeNode(SUB_TYPE_FACE,"人脸门禁机"));
        categoryList1.add(new TreeNode(SUB_TYPE_HUMAN,"人证机"));
        categoryList1.add(new TreeNode(SUB_TYPE_QRCODE,"二维码门禁"));
        categoryList1.add(new TreeNode(SUB_TYPE_PALM,"掌静脉门禁"));
        categoryList1.add(new TreeNode(SUB_TYPE_VISIT,"访客机"));
        categoryList1.add(new TreeNode(SUB_TYPE_FACE_HQ,"访客机"));

        List<TreeNode> categoryList2 = new LinkedList<>();
        categoryList2.add(new TreeNode(SUB_TYPE_STORE,"存储柜"));

        List<TreeNode> categoryList3 = new LinkedList<>();
        categoryList3.add(new TreeNode(SUB_TYPE_TRAIL,"梯控"));

        List<TreeNode> categoryList4 = new LinkedList<>();
        categoryList4.add(new TreeNode(SUB_TYPE_BOX,"智能分析盒"));
        categoryList4.add(new TreeNode(SUB_TYPE_AI_HT,"智能分析平台"));

        categories.add(new TreeNode(MAIN_TYPE_DOOR,"门禁机", categoryList1));
        categories.add(new TreeNode(MAIN_TYPE_STORE,"存储柜", categoryList2));
        categories.add(new TreeNode(MAIN_TYPE_TRAIL,"梯控",categoryList3 ));
        categories.add(new TreeNode(MAIN_TYPE_BOX,"边缘盒子", categoryList4));

    }


    public static List<TreeNode> getDeviceCategory(){
        return categories;
    }

}
